<template>
    <view class="activity-detail">
        <!-- 顶部图片区域 -->
        <view class="header">
            <image class="bg-image" :src="'/static/venues/venue1.jpg'" mode="aspectFill"></image>
            <view class="header-content">
                <view class="nav-bar">
                    <view class="left-icons">
                        <view class="icon-btn" @tap="goBack">
                            <text class="icon">←</text>
                        </view>
                        <view class="icon-btn">
                            <text class="icon">⌂</text>
                        </view>
                    </view>
                    <view class="right-icons">
                        <view class="icon-btn">
                            <text class="icon">⋮</text>
                        </view>
                    </view>
                </view>
            </view>
        </view>

        <!-- 活动内容区域 -->
        <view class="content">
            <!-- 活动基本信息 -->
            <view class="info-section">
                <view class="time-row">
                    <view class="time">
                        <text class="calendar-icon">📅</text>
                        <text class="time-text">12月18日-周三 20:00</text>
                    </view>
                    <text class="view-count">9</text>
                </view>
                <view class="location-row">
                    <view class="location">
                        <text class="location-icon">📍</text>
                        <text>昆明机械足球俱乐部</text>
                    </view>
                    <text class="location-detail">地址详情></text>
                </view>
                <view class="type-row">
                    <text class="type-icon">⚽</text>
                    <text>足球/羽毛球</text>
                </view>
                <view class="fee-row">
                    <text class="fee-label">收费：</text>
                    <text class="fee-value">AA收费</text>
                    <text class="fee-status">（未开启）</text>
                </view>
            </view>

            <!-- 发起人信息 -->
            <view class="organizer-section">
                <image class="organizer-avatar" :src="defaultAvatar" mode="aspectFill"></image>
                <view class="organizer-info">
                    <text class="organizer-name">西子好球球⚽️🏸</text>
                    <view class="organizer-stats">
                        <text>成员 104</text>
                        <text class="stat-divider">·</text>
                        <text>活动 99</text>
                        <text class="stat-divider">·</text>
                        <text>动态 20</text>
                    </view>
                </view>
            </view>

            <!-- 报名区域 -->
            <view class="signup-section">
                <view class="signup-header">
                    <text class="signup-title">报名 1/27</text>
                    <text class="signup-status">已报名</text>
                </view>
                <view class="team-list">
                    <view class="team-item">
                        <text class="team-title">队伍三（上限9人）</text>
                        <view class="member-list">
                            <view class="member-item">
                                <image class="member-avatar" src="/static/avatars/default-avatar.jpg" mode="aspectFill"></image>
                                <text class="member-name">西子...</text>
                            </view>
                        </view>
                    </view>
                </view>
            </view>

            <!-- 广告区域 -->
            <view class="ad-section">
                <image class="ad-image" src="/static/ads/insurance.jpg" mode="aspectFill"></image>
            </view>

            <!-- 评论区域 -->
            <view class="comment-section">
                <view class="comment-item">
                    <image class="comment-avatar" src="/static/avatars/default-avatar.jpg" mode="aspectFill"></image>
                    <view class="comment-content">
                        <text class="comment-text">固定周三、周六组织踢球，欢迎加我微信号进群报名</text>
                        <view class="comment-images">
                            <image class="comment-image" src="/static/venues/venue1.jpg" mode="aspectFill"></image>
                            <image class="comment-image" src="/static/venues/venue2.jpg" mode="aspectFill"></image>
                            <image class="comment-image" src="/static/venues/venue3.jpg" mode="aspectFill"></image>
                        </view>
                    </view>
                </view>
            </view>
        </view>

        <!-- 底部操作栏 -->
        <view class="bottom-bar">
            <view class="comment-input">
                <text>说点什么...</text>
            </view>
            <button class="signup-btn">申请报名</button>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            defaultAvatar: ''
        }
    },
    methods: {
        goBack() {
            uni.navigateBack()
        }
    }
}
</script>

<style lang="scss">
.activity-detail {
    min-height: 100vh;
    background-color: #f5f5f5;
}

.header {
    position: relative;
    height: 400rpx;

    .bg-image {
        width: 100%;
        height: 100%;
    }

    .header-content {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 40rpx 20rpx;
    }

    .nav-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .left-icons, .right-icons {
        display: flex;
        gap: 20rpx;
    }

    .icon-btn {
        width: 70rpx;
        height: 70rpx;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;

        .icon {
            color: #fff;
            font-size: 40rpx;
        }
    }
}

.content {
    padding: 20rpx;
}

.info-section {
    background: #fff;
    border-radius: 12rpx;
    padding: 30rpx;
    margin-bottom: 20rpx;

    .time-row, .location-row, .type-row, .fee-row {
        display: flex;
        align-items: center;
        margin-bottom: 20rpx;
    }

    .time {
        flex: 1;
        display: flex;
        align-items: center;
        font-size: 32rpx;
        font-weight: bold;

        .calendar-icon {
            margin-right: 10rpx;
        }
    }

    .view-count {
        color: #999;
        font-size: 24rpx;
    }

    .location {
        flex: 1;
        display: flex;
        align-items: center;
        font-size: 28rpx;

        .location-icon {
            margin-right: 10rpx;
        }
    }

    .location-detail {
        color: #666;
        font-size: 28rpx;
    }

    .type-row {
        font-size: 26rpx;
        color: #666;

        .type-icon {
            margin-right: 10rpx;
        }
    }

    .fee-row {
        font-size: 28rpx;

        .fee-label {
            color: #666;
        }

        .fee-status {
            color: #999;
            margin-left: 10rpx;
        }
    }
}

.organizer-section {
    background: #fff;
    border-radius: 12rpx;
    padding: 30rpx;
    margin-bottom: 20rpx;
    display: flex;
    align-items: center;

    .organizer-avatar {
        width: 100rpx;
        height: 100rpx;
        border-radius: 50%;
        margin-right: 20rpx;
    }

    .organizer-info {
        flex: 1;

        .organizer-name {
            font-size: 30rpx;
            font-weight: bold;
            margin-bottom: 10rpx;
        }

        .organizer-stats {
            font-size: 24rpx;
            color: #666;

            .stat-divider {
                margin: 0 10rpx;
            }
        }
    }
}

.signup-section {
    background: #fff;
    border-radius: 12rpx;
    padding: 30rpx;
    margin-bottom: 20rpx;

    .signup-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 30rpx;

        .signup-title {
            font-size: 28rpx;
            font-weight: bold;
        }

        .signup-status {
            color: #ff6b35;
            font-size: 28rpx;
        }
    }

    .team-list {
        .team-item {
            .team-title {
                font-size: 26rpx;
                color: #666;
                margin-bottom: 20rpx;
            }

            .member-list {
                display: flex;
                flex-wrap: wrap;
                gap: 20rpx;

                .member-item {
                    display: flex;
                    flex-direction: column;
                    align-items: center;

                    .member-avatar {
                        width: 80rpx;
                        height: 80rpx;
                        border-radius: 50%;
                        margin-bottom: 10rpx;
                    }

                    .member-name {
                        font-size: 24rpx;
                        color: #666;
                    }
                }
            }
        }
    }
}

.ad-section {
    margin-bottom: 20rpx;

    .ad-image {
        width: 100%;
        height: 160rpx;
        border-radius: 12rpx;
    }
}

.comment-section {
    background: #fff;
    border-radius: 12rpx;
    padding: 30rpx;
    margin-bottom: 120rpx;

    .comment-item {
        display: flex;

        .comment-avatar {
            width: 80rpx;
            height: 80rpx;
            border-radius: 50%;
            margin-right: 20rpx;
        }

        .comment-content {
            flex: 1;

            .comment-text {
                font-size: 28rpx;
                margin-bottom: 20rpx;
            }

            .comment-images {
                display: flex;
                gap: 10rpx;

                .comment-image {
                    width: 180rpx;
                    height: 180rpx;
                    border-radius: 8rpx;
                }
            }
        }
    }
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20rpx;
    background: #fff;
    display: flex;
    align-items: center;
    border-top: 1rpx solid #eee;

    .comment-input {
        flex: 1;
        height: 70rpx;
        background: #f5f5f5;
        border-radius: 35rpx;
        padding: 0 30rpx;
        margin-right: 20rpx;
        display: flex;
        align-items: center;
        color: #999;
        font-size: 28rpx;
    }

    .signup-btn {
        height: 70rpx;
        line-height: 70rpx;
        padding: 0 40rpx;
        background: #ff6b35;
        color: #fff;
        border-radius: 35rpx;
        font-size: 28rpx;
    }
}
</style> 